package main

import (
	"fmt"
	"math"
)

func Sqrt(x, z float64) float64 {
    y := z
	z = z - (math.Pow(z, 2)-x)/(2*z)
    if math.Abs(y-z) > 0.00001{
        return Sqrt(x, z)
    }
    return z
}

func main() {
    z := 1.0
	fmt.Println(Sqrt(2, z))
    fmt.Println(math.Sqrt(2))
}
